package com.ttl.bc.ap.purchaseorder.bean;

import java.io.Serializable;


@SuppressWarnings({ "serial", "unchecked" })
public class BCPurchaseOrderShowBean implements Serializable, Comparable{
	private String  numberForSort;		//เอาไว้เก็บค่า ตอนเอามาเรียงลำดับในตอนบันทึก inv
	private	String	docNo;				//ไว้เก็บค่า docNo ตอนเอามาเรียงลำดับ ในตอนบันทึก inv
	private	String	itemCode;			
	private	String	itemName;
	private	String	unitCode;
	private	String	unitName;
	private	String	qty;
	
	private	String	whCode;
	private	String	shelfCode;
	
	private	String	ittl_purchaseCode;	//ittl_purchaseCode จาก BCPurchaseOrder
	private	String	confirmNo;			//เลขที่ใบอนุมัติเสนอซื้อ		//จาก DocNo ของ BCReqConfirm
	private	String	stkReqNo;   		//เลขที่ใบเสนอซื้อ (ขอซื้อ พ1)	//จาก DocNo ของ BCStkRequest
		
	private	String	departCode;
	private	String	projectCode;
	
	//############## สำหรับไว้เก็บค่าของ lineitem ใน invoicesub ################
	private	Integer	ittl_rowOrderOfStkReq;
	private	String	lineNumber;
	private	String	price;
	private	String	lineItemDiscountAmount;
	private	String	amount;
	private	String	lineItem_whCode;
	private	String	lineItem_shelfCode;
	private	String	lineItem_statusReceive;
	private	String	lineItem_departCode;
	private	String	lineItem_projectCode;
	private	String	lineItem_allocateCode;
	private	String	lineItem_myDescription;
	private	String	lineItem_poRefNo;
	private	String	lineItem_netAmount;
	private	String	lineItem_homeAmount;
	// ###################### end ####################
	
	
    public int compareTo(Object examObj){
        if (examObj != null) {
        	BCPurchaseOrderShowBean a = (BCPurchaseOrderShowBean)examObj;
//        	System.out.println("############");
//        	System.out.println(lineNumber + "    "+ itemName);
//        	System.out.println(a.getLineNumber() + "    "+a.itemName);
//        	System.out.println(lineNumber.compareTo(a.getLineNumber()));
//        	System.out.println("############");
            return (numberForSort.compareTo(a.getNumberForSort()));
        }
        return 0;
    }	
			
	
	public String getNumberForSort() {
		return numberForSort;
	}


	public void setNumberForSort(String numberForSort) {
		this.numberForSort = numberForSort;
	}


	public String getLineNumber() {
		return lineNumber;
	}
	public String getDocNo() {
		return docNo;
	}
	public void setDocNo(String docNo) {
		this.docNo = docNo;
	}
	public Integer getIttl_rowOrderOfStkReq() {
		return ittl_rowOrderOfStkReq;
	}
	public void setIttl_rowOrderOfStkReq(Integer ittlRowOrderOfStkReq) {
		ittl_rowOrderOfStkReq = ittlRowOrderOfStkReq;
	}
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getLineItemDiscountAmount() {
		return lineItemDiscountAmount;
	}
	public void setLineItemDiscountAmount(String lineItemDiscountAmount) {
		this.lineItemDiscountAmount = lineItemDiscountAmount;
	}
	public String getLineItem_whCode() {
		return lineItem_whCode;
	}
	public void setLineItem_whCode(String lineItemWhCode) {
		lineItem_whCode = lineItemWhCode;
	}
	public String getLineItem_shelfCode() {
		return lineItem_shelfCode;
	}
	public void setLineItem_shelfCode(String lineItemShelfCode) {
		lineItem_shelfCode = lineItemShelfCode;
	}
	public String getLineItem_statusReceive() {
		return lineItem_statusReceive;
	}
	public void setLineItem_statusReceive(String lineItemStatusReceive) {
		lineItem_statusReceive = lineItemStatusReceive;
	}
	public String getLineItem_departCode() {
		return lineItem_departCode;
	}
	public void setLineItem_departCode(String lineItemDepartCode) {
		lineItem_departCode = lineItemDepartCode;
	}
	public String getLineItem_projectCode() {
		return lineItem_projectCode;
	}
	public void setLineItem_projectCode(String lineItemProjectCode) {
		lineItem_projectCode = lineItemProjectCode;
	}
	public String getLineItem_allocateCode() {
		return lineItem_allocateCode;
	}
	public void setLineItem_allocateCode(String lineItemAllocateCode) {
		lineItem_allocateCode = lineItemAllocateCode;
	}
	public String getLineItem_myDescription() {
		return lineItem_myDescription;
	}
	public void setLineItem_myDescription(String lineItemMyDescription) {
		lineItem_myDescription = lineItemMyDescription;
	}
	public String getLineItem_poRefNo() {
		return lineItem_poRefNo;
	}
	public void setLineItem_poRefNo(String lineItemPoRefNo) {
		lineItem_poRefNo = lineItemPoRefNo;
	}
	public String getLineItem_netAmount() {
		return lineItem_netAmount;
	}
	public void setLineItem_netAmount(String lineItemNetAmount) {
		lineItem_netAmount = lineItemNetAmount;
	}
	public String getLineItem_homeAmount() {
		return lineItem_homeAmount;
	}
	public void setLineItem_homeAmount(String lineItemHomeAmount) {
		lineItem_homeAmount = lineItemHomeAmount;
	}
	public void setLineNumber(String lineNumber) {
		this.lineNumber = lineNumber;
	}
	public String getAmount() {
		return amount;
	}
	public void setAmount(String amount) {
		this.amount = amount;
	}
	public String getIttl_purchaseCode() {
		return ittl_purchaseCode;
	}
	public void setIttl_purchaseCode(String ittlPurchaseCode) {
		ittl_purchaseCode = ittlPurchaseCode;
	}
	public String getDepartCode() {
		return departCode;
	}
	public void setDepartCode(String departCode) {
		this.departCode = departCode;
	}
	public String getProjectCode() {
		return projectCode;
	}
	public void setProjectCode(String projectCode) {
		this.projectCode = projectCode;
	}
	public String getUnitName() {
		return unitName;
	}
	public void setUnitName(String unitName) {
		this.unitName = unitName;
	}
	public String getItemCode() {
		return itemCode;
	}
	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}
	public String getItemName() {
		return itemName;
	}
	public void setItemName(String itemName) {
		this.itemName = itemName;
	}
	public String getWhCode() {
		return whCode;
	}
	public void setWhCode(String whCode) {
		this.whCode = whCode;
	}
	public String getShelfCode() {
		return shelfCode;
	}
	public void setShelfCode(String shelfCode) {
		this.shelfCode = shelfCode;
	}
	public String getUnitCode() {
		return unitCode;
	}
	public void setUnitCode(String unitCode) {
		this.unitCode = unitCode;
	}
	public String getQty() {
		return qty;
	}
	public void setQty(String qty) {
		this.qty = qty;
	}
	public String getStkReqNo() {
		return stkReqNo;
	}
	public void setStkReqNo(String stkReqNo) {
		this.stkReqNo = stkReqNo;
	}
	public String getConfirmNo() {
		return confirmNo;
	}
	public void setConfirmNo(String confirmNo) {
		this.confirmNo = confirmNo;
	}
	
	
}
